package fun.werfamily.wf.order.core.domain.remote.service;

import fun.werfamily.wf.base.constant.ServiceConstant;
import fun.werfamily.wf.base.vo.Result;
import fun.werfamily.wf.order.core.domain.dto.req.user.UserAddressIdDTO;
import fun.werfamily.wf.order.core.domain.dto.req.user.UserIdDTO;
import fun.werfamily.wf.order.core.domain.dto.result.user.UserAddressDTO;
import fun.werfamily.wf.order.core.domain.dto.result.user.UserInfoDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Mr.WenMing Zhang
 * @Date: 2022-08-28 12:28
 * @Description:
 */
@FeignClient(name = ServiceConstant.USER_CORE_NAME, path = ServiceConstant.USER_CORE_PATH)
public interface UserRemoteService {

    @ApiOperation("用户详情")
    @PostMapping("/user/info")
    Result<UserInfoDTO> userInfo(@RequestBody UserIdDTO userIdDTO);

    @PostMapping("/user/address/detail")
    @ApiOperation("收货地址详情")
    Result<UserAddressDTO> getAddressById(@RequestBody UserAddressIdDTO userAddressIdDTO);

    @PostMapping("/user/address/getDefaultAddr")
    @ApiOperation("默认收货地址")
    Result<UserAddressDTO> getDefaultAddr(@RequestBody UserIdDTO userIdDTO);
}
